
package model.timers;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Timer;

public abstract class BlindCounter implements ActionListener{

        public abstract int getBigBlind();
        public abstract int getSmallBlind();
        protected abstract void increaseBlind();
        
        
        private Timer blindTimer;
        private int blindLevel;
        private int blindIncreaseTime;
        
        BlindCounter(int blindIncreaseTime){            
                this.blindTimer = new Timer(blindIncreaseTime*1000, this);
                this.blindLevel = 1;
        }
        
        public void startBlindTimer(){
                this.blindTimer.start();
        }
        
        public void stopBlindTimer(){
                this.blindTimer.stop();
        }

        @Override
        public void actionPerformed(ActionEvent arg0) {
                // Received an event, this indicates it is time to increase the blinds
                this.increaseBlind();
                blindLevel++;
        }
}